import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import App from './App.vue'
import router from './route'
import apps from './micro-app'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import 'element-plus/dist/index.css'
import 'rest-css'

const app = createApp(App)
app.use(router)
app.use(ElementPlus)
app.mount('#app')

import {registerMicroApps } from 'qiankun'
// 注册子应用
registerMicroApps(apps, {
  beforeLoad: (app) => {
    console.log('子应用加载前', app)
    NProgress.start()
  },
  afterMount: (app) => {
    console.log('子应用渲染', app);
    NProgress.done()
  }
})
// 启动qiankun微前端
// start({
//   sandbox: {
//     strictStyleIsolation: false
//   }
// })